package java12;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class RandomInput2 {

	public static void main(String[] args) throws IOException {
		FileWriter FileName = new FileWriter("d:/test.txt"); 
		int count = 1000 * 10000;
//		 BW
		BufferedWriter bw = null;
		try {
			bw = new BufferedWriter(FileName);
			for (int i = 0; i < count; i++) {
				bw.write(new Random().nextInt(100000));
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bw.close();
			} catch (NullPointerException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
}
